﻿using System;
using System.Drawing;

namespace MassIntellect.Drawing
{
    public static class PointFExtension
    {
        /// <summary>
        /// Расстояние до точки
        /// </summary>
        /// <param name="pnt"></param>
        /// <param name="dest"></param>
        /// <returns>Расстояние</returns>
        public static float DistanceTo(this PointF pnt, PointF dest)
        {
            return (float)Math.Sqrt(Math.Pow(pnt.X - dest.X, 2) + Math.Pow(pnt.Y - dest.Y, 2));
        }
    }
}
